import moment from "moment"
import { publicPath } from "./env"

export const downloadStaticFile = (url: string) => {
  window.open(`${publicPath}${url}`)
}
// 大于一个月
export const gtOneMonth = (date1: any, date2: any) => {
  // const n = moment(date2).diff(moment(date1), 'months')
  const maxDate = moment(date1).add(1,'month').set('h',23).set('minute',59).set('second',59)
  console.log('时间',moment(maxDate).format('YYYY-MM-DD HH:mm:ss'))
  console.log('时间',moment(moment(date2)).format('YYYY-MM-DD HH:mm:ss'))
  return moment(date2)>maxDate
}

